<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://xmlns.jcp.org/jsf/html"
	xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
	xmlns:c="http://xmlns.jcp.org/jsf/composite"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="Pragma" content="no-cache" />
	<meta http-equiv="Expires" content="-1" />
	<title>ST Manager</title>
	<link href="imagem/favicon.png" type="image/png" rel="shortcut icon" />
	<link type="text/css" rel="stylesheet"
		href="#{request.contextPath}/css/skytef.css" />

</h:head>
<h:body styleClass="body">
	<ui:include src="header.xhtml" />
	<div class="central">
		<h:form id="form">
			<p:panel header="Consulta de Tarefas:" resizable="false"
				style="width: 97.5%;">
				<p:messages />
				<p:panelGrid columns="4">



					<p:selectOneRadio id="options" value="#{TarefaBean.tpConsulta}">
						<f:selectItem itemLabel="CNPJ/" itemValue="1" />
						<f:selectItem itemLabel="Razão Social/" itemValue="2" />
						<f:selectItem itemLabel="Id Skytef/" itemValue="3" />
						<f:selectItem itemLabel="Id Usuário/" itemValue="4" />
						<f:selectItem itemLabel="Nº Tarefa" itemValue="5" />
					</p:selectOneRadio>
					<p:inputText id="maskcnpj" value="#{TarefaBean.textoConsulta}" />
					<h:outputText value="Status: "
						style="font-size: 14px;font-weight:bold;" />
					<p:selectOneMenu id="status" style="font-size: 14px;"
						value="#{TarefaBean.tarefa.status}">
						<f:selectItem itemLabel="Todos" itemValue="T" />
						<f:selectItem itemLabel="Pendente" itemValue="P" />
						<f:selectItem itemLabel="Concluído" itemValue="C" />
					</p:selectOneMenu>
					<p:commandButton id="btBuscar" style="font-size: 14px;"
						image="ui-icon-search" ajax="false"
						actionListener="#{TarefaBean.consultarTarefa}"
						update="form:btBuscar" />
				</p:panelGrid>

				<p:dataTable id="tabelaPlan" var="tarefa"
					value="#{TarefaBean.resulTarefa}" stickyHeader="true"
					rowIndexVar="rowIndex" style="margin-top:80px; position: auto"
					paginator="true" rows="50">
					<p:column style="font-size: 10px;">
						<f:facet name="header">Nº Tarefa</f:facet>
						<h:outputText value="#{tarefa.id}" />
					</p:column>
					<p:column style=" font-size: 10px; width: 97px">
						<f:facet name="header">Responsável</f:facet>
						<h:outputText value="#{tarefa.nome}" />
					</p:column>
					<p:column style=" font-size: 10px; width: 97px">
						<f:facet name="header">CNPJ</f:facet>
						<h:outputText value="#{tarefa.cnpj}" />
					</p:column>
					<p:column style=" font-size: 10px; width: 97px">
						<f:facet name="header">Status</f:facet>
						<h:outputText value="#{tarefa.status}" />
					</p:column>

					<p:column style="font-size: 10px; width:25px;">
						<f:facet name="header">Detalhar</f:facet>
						<p:commandButton id="selectButton" update=":form:clienteDlg"
							oncomplete="PF('clienteDialog').show()" image="ui-icon-search"
							actionListener="#{TarefaBean.detalhar}" />
					</p:column>
				</p:dataTable>
			</p:panel>
			
			
			 <p:dialog header="Cadastro de Contato" widgetVar="clienteDialog"
				resizable="false" id="clienteDlg" showEffect="fade"
				hideEffect="explode" modal="true">
				<h:panelGrid columns="2" cellpadding="4">
					
				</h:panelGrid>
			</p:dialog>
			
			
		</h:form>
	</div>
	<p:panel id="cm" style="background: transparent; border: 0px;">
		<ui:include src="#{DashboardBean.currentMenu}" />
	</p:panel>
	<p:panel id="cr" style="background: transparent; border: 0px;">
		<ui:include src="#{DashboardBean.currentRodape}" />
	</p:panel>
</h:body>
</html>
